
//饼图
export function annularEchar (data, title) {
  const dataAll = [
    [
      [10.0, 8.04],
      [8.0, 6.95],
      [13.0, 7.58],
      [9.0, 8.81],
      [11.0, 8.33],
      [14.0, 9.96],
      [6.0, 7.24],
      [4.0, 4.26],
      [12.0, 10.84],
      [7.0, 4.82],
      [5.0, 5.68]
    ],
  ];
  const markLineOpt = {
    animation: false,
    label: {
      formatter: 'y=3-0.1067*温度+0.0382*喂料量*振动频率',
      align: 'right'
    },
    lineStyle: {
      color: '#1e1e1e',
      type: 'solid',
      width: 2,
    },
    tooltip: {
      formatter: 'y = 0.5 * x + 3'
    },
    data: [
      [
        {
          coord: [0, 3],
          symbol: 'none'
        },
        {
          coord: [20, 13],
          symbol: 'none'
        }
      ]
    ]
  };

  return {
    title: {
      text: "\n残差分析",
      left: 'center',
      top: 0
    },
    grid: [
      { left: '7%', top: '11%', width: '90%', height: '80%' },

    ],
    tooltip: {
      formatter: '{a} ({c})'
    },
    xAxis: [
      { gridIndex: 0, min: 0, max: 20 },

    ],
    yAxis: [
      { gridIndex: 0, min: 0, max: 15 },

    ],
    series: [
      {
        name: '',
        color: '#0000ff',
        type: 'scatter',
        xAxisIndex: 0,
        yAxisIndex: 0,
        data: dataAll[0],
        markLine: markLineOpt
      },
    ]
  }
}

